#include "server.hpp"
#include "dbconfig.hpp"

int main()
{
    // 0.创建日志器
    using namespace mylog;
    LoggerBuilder* lb = new UserLoggerBuilder();
    lb->setFormatter();
    lb->setLoggerName(LOGGER_NAME);
    lb->setMinLevel(Level::Value::DEBUG);
    lb->setLoggerType(Logger::Type::SYNC);
    lb->setSinker<ColorConsoleSinker>();
    // lb->setSinker<FileSinker>("/home/alonely/logFile/log.log");
    auto log = lb->build();

    gomoku::GomokuServer svr(HOST, PORT, USER, PASS, DBNAME);
    svr.Start(SERVER_PORT);
    return 0;
}